package com.blb.zycommunity.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.blb.zycommunity.entity.ZyRoom;
import com.blb.zycommunity.mapper.ZyRoomMapper;
import com.blb.zycommunity.service.IZyRoomService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;



/**
 * <p>
 * 房间  服务实现类
 * </p>
 *
 * @author chenheng
 * @since 2023-11-20
 */
@Service
public class ZyRoomServiceImpl extends ServiceImpl<ZyRoomMapper, ZyRoom> implements IZyRoomService {

    @Resource
    private ZyRoomMapper zyRoomMapper;

    @Override
    public IPage<ZyRoom> selectByAll(Long current, Long size, String unitId, String buildingId, String roomStatus,String communityId) {
        IPage<ZyRoom> zyRoomIPage = zyRoomMapper.selectByAll(new Page<>(current,size),unitId,buildingId,roomStatus,communityId);
        return zyRoomIPage;
}


    @Override
    public List<ZyRoom> findRoomByBuildingId(String unitId) {
        return zyRoomMapper.selectRoomByBuildingId(unitId);
    }
}
